﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="kecheng_manage1.aspx.cs" Inherits="kecheng_kecheng_manage1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>无标题页</title>
       <link href="../style.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server"> <div style="margin-top:10px;">
    <asp:Button ID="btnBack" runat="server" OnClick="btnBack_Click" Text="回上一页" /><br />
    <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataSourceID="SqlDataSource1"
        Width="820" OnItemUpdating="DetailsView1_ItemUpdating" BorderWidth=0 class="border_det">
        <Fields>
            <asp:CommandField ShowEditButton="True" />
            <asp:TemplateField HeaderText="作用分类">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("fenlei1") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>

                    <asp:DropDownList ID="ddlfenlei1" runat="server" DataSourceID="SqlFenlei1" DataTextField="value"
                        DataValueField="value" Font-Size="10pt" SelectedValue='<%# Bind("fenlei1") %>' >
                    </asp:DropDownList>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="学习对象">
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Eval("fenlei2") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    
                    <asp:DropDownList ID="ddlfenlei2" runat="server" DataSourceID="SqlFenlei2" DataTextField="value"
                        DataValueField="value" Font-Size="10pt" SelectedValue='<%# Bind("fenlei2") %>'>
                    </asp:DropDownList>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="课程分类">
                <ItemTemplate>
                    <asp:Label ID="Label3" runat="server" Text='<%# Eval("fenlei3") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    
                    <asp:DropDownList ID="ddlfenlei3" runat="server" DataSourceID="SqlFenlei3" DataTextField="value"
                        DataValueField="value" Font-Size="10pt" SelectedValue='<%# Bind("fenlei3") %>'>
                    </asp:DropDownList>
                </EditItemTemplate>
            </asp:TemplateField>
            
            <asp:BoundField DataField="name" HeaderText="课程名称" />
            <asp:BoundField DataField="jigou" HeaderText="机构"  />
            <asp:BoundField DataField="laoshi" HeaderText="任课老师"  />
            <asp:BoundField DataField="confirm" HeaderText="审核标志"  />
            <asp:TemplateField HeaderText="课程简介">
                <ItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("jianjie") %>' TextMode="MultiLine"
                        Font-Size="9pt" Height="60px" Width="100%"></asp:TextBox>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="tuijian" HeaderText="推荐" SortExpression="tuijian" />
            <asp:TemplateField HeaderText="课程类型">
                <ItemTemplate>
                    <asp:Label ID="Lblkechenglx" runat="server" Text='<%# Eval("kechenglx") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:DropDownList ID="ddlkechenglx" runat="server" DataSourceID="Sqlkechenglx" DataTextField="value"
                        DataValueField="value" Font-Size="10pt" SelectedValue='<%# Bind("kechenglx") %>' AutoPostBack="True" OnSelectedIndexChanged="ddlkechenglx_SelectedIndexChanged">
                    </asp:DropDownList>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="发布状态">
                <ItemTemplate>
                    <asp:Label ID="Lblfabuzt" runat="server" Text='<%# Eval("fabuzt") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    
                    <asp:DropDownList ID="ddlfabuzt" runat="server" DataSourceID="Sqlfabuzt" DataTextField="value"
                        DataValueField="value" Font-Size="10pt" AutoPostBack="True" SelectedValue='<%# Bind("fabuzt") %>'>
                    </asp:DropDownList>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="学费">
                <ItemTemplate>
                    <asp:TextBox ID="txtxuefei" runat="server" Text='<%# Bind("xuefei") %>' Font-Size="9pt" ></asp:TextBox>
                </ItemTemplate>
            </asp:TemplateField>
        </Fields>
        <HeaderStyle Width="50px" />
    </asp:DetailsView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:gConnectionString %>"
        SelectCommand="SELECT * FROM [kecheng] WHERE ([id] = @id)" UpdateCommand="UPDATE [kecheng] SET [fenlei1] = @fenlei1, [fenlei2] = @fenlei2, [fenlei3] = @fenlei3, [name]=@name, [jigou]=@jigou,[laoshi]=@laoshi,[jianjie]=@jianjie,[tuijian]=convert(money, @tuijian),[kechenglx]=@kechenglx,[xuefei]=convert(money,@xuefei),[fabuzt]=@fabuzt WHERE ([id] = @id)">
        <SelectParameters>
            <asp:QueryStringParameter Name="id" QueryStringField="id" />
        </SelectParameters>
        <UpdateParameters>
            <asp:QueryStringParameter Name="id" QueryStringField="id" />
            <asp:Parameter Name="fenlei1" />
            <asp:Parameter Name="fenlei2" />
            <asp:Parameter Name="fenlei3" />
            <asp:Parameter Name="name" />
            <asp:Parameter Name="jigou" />
            <asp:Parameter Name="laoshi" />
            <asp:Parameter Name="jianjie" />
            <asp:Parameter Name="tuijian" />
            <asp:Parameter Name="kechenglx" />
            <asp:Parameter Name="xuefei" />
            <asp:Parameter Name="fabuzt" />
        </UpdateParameters>
    </asp:SqlDataSource>
    <br />
    &nbsp;<table border="0" width="100%" class="font33">
        <tr>
            <td width="25%">
                <asp:SqlDataSource ID="SqlFenlei1" runat="server" ConnectionString="<%$ ConnectionStrings:gConnectionString %>"
                    SelectCommand="SELECT * FROM [nzd] WHERE ([type] = @type)">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="专业分类1" Name="type" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
            <td width="25%">
                <asp:SqlDataSource ID="SqlFenlei2" runat="server" ConnectionString="<%$ ConnectionStrings:gConnectionString %>"
                    SelectCommand="SELECT * FROM [nzd] WHERE ([type] = @type)">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="专业分类2" Name="type" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
            <td width="25%">
                &nbsp;<asp:SqlDataSource ID="SqlFenlei3" runat="server" ConnectionString="<%$ ConnectionStrings:gConnectionString %>"
                    SelectCommand="SELECT * FROM [nzd] WHERE ([type] = @type)">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="专业分类3" Name="type" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
            <td width="25%">
            </td>
        </tr>
        <tr>
            <td width="25%">&nbsp;
                
            </td>
            <td width="25%">
                &nbsp;<asp:SqlDataSource ID="SqlKechenglx" runat="server" ConnectionString="<%$ ConnectionStrings:gConnectionString %>"
                    SelectCommand="SELECT * FROM [nzd] WHERE ([type] = @type)">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="课程类型" Name="type" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
            <td width="25%">
                <asp:SqlDataSource ID="SqlDataSource7" runat="server"></asp:SqlDataSource>
            </td>
            <td width="25%">
                <asp:SqlDataSource ID="Sqlfabuzt" runat="server" ConnectionString="<%$ ConnectionStrings:gConnectionString %>"
                    SelectCommand="SELECT * FROM [nzd] WHERE ([type] = @type)">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="发布状态" Name="type" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
    </table>
    </div>
</form>
</body>
</html>

